<?php $experienceAverageRating = gfToolkit::format($experience->getRating()->getTotal() / ($experience->getRating()->getCount() == 0 ? 1 : $experience->getRating()->getCount()), 1) ?>
<?php for ($i = 1; $i <= 5; $i++): ?>
    <!-- this in it's own is the beginning of a great career of the Giant -->
    <div class="rate-experience <?php
    if ($i <= $experienceAverageRating)
    {
        echo "full-star";
    }
    else
    {
        echo ((($i - $experienceAverageRating) > 0 && ($i - $experienceAverageRating) < 1) && $experienceAverageRating > 0) ? "half-star" : "empty-star";
    }
    ?>" experienceid="<?php echo $experience->getId() ?>" rating="<?php echo $i; ?>"></div>
<?php endfor; ?>